function [pos, status] = PQ_Get_Pos(PQ, id, priority)
%PQ_Fetch_Task Summary of this function goes here
%   Detailed explanation goes here
status = 0;
pos = 0;

for k = 1:size(PQ.queue, 2)
  if PQ.queue(k).task.id == id
    if ((priority < 1) || (priority == PQ.queue(number).priority))
      pos = k;
      status = 1;
    end
    break;
  end
end
end